package com.gettingstarted.gds.model
{
 	import mx.collections.ArrayCollection;
	import com.adobe.cairngorm.model.IModelLocator;
    
    [Bindable]
	public class ModelLocator implements IModelLocator
	{
		private static var modelLocator : ModelLocator;
		
		public var _contacts:ArrayCollection = new ArrayCollection();
		
		/**
		 * returns the single instance of model locator.
		 */
		public static function getInstance() : ModelLocator
		{
			if ( modelLocator == null )
				modelLocator = new ModelLocator();
			return modelLocator;
	    }
	   
   		public function ModelLocator() 
   		{
   			if (ModelLocator.modelLocator != null )
				throw new Error( "Only one ModelLocator instance should be instantiated" );	
   		}
    }
}

